// const div = cha.create('<div><span>1</span></div>')
const div = cha.create('<div>newDiv</div>')

cha.after(test, div)

const div3 = cha.create('<div id="parent"></div>')
cha.wrap(test, div3)

const a = cha.empty(test2)
console.log(a);

cha.attr(test, 'title', 'hi')

const title = cha.attr(test, 'title')

console.log('title' + title);

cha.text(test3, '666666')
console.log(cha.text(test3));


cha.style(test3, { border: '1px solid red', color: 'blue' })
cha.style(test, 'border', '1px solid blue')
console.log(cha.style(test, 'border'));

cha.class.add(test3, 'red')
console.log(cha.class.has(test3, 'red'));

const fn = () => {
  console.log('点击了')
}

cha.on(test3, 'click', fn)

cha.off(test3, 'click', fn)

const testDiv = cha.find('#test3')[0]
console.log(testDiv);

const redred = cha.find('.red', test5)[0]
console.log(redred)

const parent1 = cha.parent(test5)
console.log(parent1);